<template>
  <div>
    <el-button @click="logout">登出</el-button>
    <section>
      <div></div>
      <div></div>
      <div>
        <h1 @click="addMember">员工管理</h1>
      </div>
    </section>
  </div>
</template>

<script>
import { query } from '@/tools/mysql';

export default {
  name: 'Home',
  data() {
    return {

    };
  },
  created() {

  },
  async mounted() {
    // let res = await query(`INSERT INTO \`order\`(order_id) VALUES(2222)`);
    // console.log(res);
    let res2 = await query('SELECT * FROM \`order\`');
    console.log(res2);
  },
  methods: {
    logout() {
      this.$router.push('/login')
    },
    addMember() {
      this.$router.push('/staff')

    }
  },
};
</script>

<style scoped lang="scss">
section {
  width: 100%;
  height: 600px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-row-gap: 12px;
  grid-column-gap: 12px;
  div {
    // background: red;
    border-radius: 12px;
    border: 2px solid #ccc;
  }
}
</style>
